package com.ticket.sass.common.printer.config;

import com.google.gson.Gson;

/**
 * @author ywb
 * @date 2024-05-10 14:18
 */
public class YiLianYunPrinterConfig extends PrinterConfig {
    private String clientId;
    private String clientSecret;
    private String machineCode;
    private String msign;
    // 可选
    private String token;
    
    public YiLianYunPrinterConfig() {
    }
    
    public static YiLianYunPrinterConfig fromJson(String jsonString) {
        Gson gson = new Gson();
        return gson.fromJson(jsonString, YiLianYunPrinterConfig.class);
    }
    
    public String getClientId() {
        return clientId;
    }
    
    public void setClientId(String clientId) {
        this.clientId = clientId;
    }
    
    public String getClientSecret() {
        return clientSecret;
    }
    
    public void setClientSecret(String clientSecret) {
        this.clientSecret = clientSecret;
    }
    
    public String getMachineCode() {
        return machineCode;
    }
    
    public void setMachineCode(String machineCode) {
        this.machineCode = machineCode;
    }
    
    public String getMsign() {
        return msign;
    }
    
    public void setMsign(String msign) {
        this.msign = msign;
    }
    
    public String getToken() {
        return token;
    }
    
    public void setToken(String token) {
        this.token = token;
    }
    
    @Override
    public String toString() {
        return "YiLianYunPrinterConfig{" +
            "clientId='" + clientId + '\'' +
            ", clientSecret='" + clientSecret + '\'' +
            ", machineCode='" + machineCode + '\'' +
            ", msign='" + msign + '\'' +
            ", token='" + token + '\'' +
            '}';
    }
}
